x86: improve psr scheduling code
authorChao Peng <chao.p.peng@linux.intel.com>
Mon, 4 May 2015 09:54:39 +0000 (11:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 4 May 2015 09:54:39 +0000 (11:54 +0200)
commit375a90b7de02a72263615a82f800e4fef689f7f0
tree025090ce040a2b394044fddc6edff06346cdce0b
parent5c44b5cf352e4d71bb15197560a7e552f0920764
x86: improve psr scheduling code

Switching RMID from previous vcpu to next vcpu only needs to write
MSR_IA32_PSR_ASSOC once. Write it with the value of next vcpu is enough,
no need to write '0' first. Idle domain has RMID set to 0 and because MSR
is already updated lazily, so just switch it as it does.

Also move the initialization of per-CPU variable which used for lazy
update from context switch to CPU starting.

Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
xen/arch/x86/domain.c
xen/arch/x86/psr.c
xen/include/asm-x86/psr.h